//
// Created by jinbang.li on 2023/5/21.
//

#ifndef OPENPLAYDEMO_OPFFDECODE_H
#define OPENPLAYDEMO_OPFFDECODE_H

#include "IOpDecode.h"
#include "../Data/OpParameter.h"
#include "../Data/OpData.h"
struct AVCodecContext;
struct AVFrame;
class OpFFDecode: public IOpDecode{
public:
    static void InitHard(void *vm);
    ///打开编码器
    virtual bool Open(OpParameter opParameter,bool isHard = false);
    ///发送数据到线程解码
    virtual bool SendPacket(OpData pkt);
    ///从线程中获取解码结果
    virtual OpData RecvFrame();

protected:
    AVCodecContext *codecContext = 0;
    AVFrame *frame = 0;
};


#endif //OPENPLAYDEMO_OPFFDECODE_H
